﻿namespace Tomato.Allure
{
	internal class OutputWindowImpl : Tomato.Allure.IOutputWindow
	{
		private EnvDTE.OutputWindow m_instance;

		public IOutputWindowPane ActivePane
		{
			get
			{
				if( m_instance.ActivePane != null )
				{
					return new OutputWindowPaneImpl( m_instance.ActivePane );
				}

				return null;
			}
		}

		public IOutputWindowPane this[ string paneName ]
		{
			get
			{
				EnvDTE.OutputWindowPane windowPane = m_instance.OutputWindowPanes.Item( paneName );
				if( windowPane != null )
				{
					return new OutputWindowPaneImpl( windowPane );
				}

				return null;
			}
		}

		public OutputWindowImpl( EnvDTE.OutputWindow instance )
		{
			m_instance = instance;
		}
	}
}